import {
  createRouter,
  createWebHistory,
  createWebHashHistory,
} from "vue-router";

const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  linkActiveClass: "active",
  linkExactActiveClass: "active",
  routes: [
    {
      path: "/",
      redirect: "/realtime",
      component: () => import("../views/realtime.vue"),
    },
    {
      path: "/realtime",
      name: "Realtime",
      component: () => import("../views/realtime.vue"),
    },
    {
      path: "/history",
      name: "History",
      component: () => import("../views/history.vue"),
    },
    {
      path: "/404",
      name: "404",
      component: () => import("../views/404.vue"),
    },
  ],
});

export default router;
